package com.maiji.cloud.service;

import com.maiji.cloud.entities.community.ComComment;
import com.baomidou.mybatisplus.service.IService;
import com.maiji.cloud.entities.community.ComMsgInfo;
import com.maiji.cloud.request.BaseInputDto;
import com.maiji.cloud.request.IdInputDto;
import com.maiji.cloud.request.ReqMetaData;
import com.maiji.cloud.request.community.ComCommentMsgInputDto;
import com.maiji.cloud.response.BaseMetaResDto;
import com.maiji.cloud.response.BaseOutPutDto;
import com.maiji.cloud.response.BaseResDto;
import com.maiji.cloud.response.community.ComCommentOutputDto;
import com.maiji.cloud.response.shopingmall.FinancialDetailsResData;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;
import java.util.List;

public interface ComCommentService extends IService<ComComment> {

    /**
     *
     * 社区评论通用接口
     * @param inputDto
     * @param maijiToken
     * @return
     */
    public BaseOutPutDto<FinancialDetailsResData> comment(@RequestBody BaseInputDto<ComCommentMsgInputDto>inputDto, @RequestHeader("maijiToken")String maijiToken);

    /**
     * 评论动态
     * @param inputDto
     * @param maijiToken
     * @return
     */
    public BaseOutPutDto<FinancialDetailsResData>commentMsg(BaseInputDto<ComCommentMsgInputDto> inputDto, @RequestHeader("maijiToken")String maijiToken);

    /**
     * 转发动态
     * @param inputDto
     * @param maijiToken
     * @return
     */
    public BaseOutPutDto<FinancialDetailsResData>transmitMsg(@RequestBody BaseInputDto<ComCommentMsgInputDto>inputDto,@RequestHeader("maijiToken")String maijiToken);

    /**
     * 评论其它评论
     * @param inputDto
     * @param maijiToken
     * @return
     */
    public BaseOutPutDto<FinancialDetailsResData>commentComment(BaseInputDto<ComCommentMsgInputDto> inputDto,@RequestHeader("maijiToken")String maijiToken);

    /**
     * 评论回复
     * @param inputDto
     * @param maijiToken
     * @return
     */
    public BaseOutPutDto<FinancialDetailsResData>commentReply(@RequestBody BaseInputDto<ComCommentMsgInputDto>inputDto,@RequestHeader("maijiToken")String maijiToken);

    /**
     * 评论列表
     * @param inputDto
     * @param maijiToken
     * @return
     */
    public BaseOutPutDto<List<ComCommentOutputDto>>commentList(BaseInputDto<IdInputDto>inputDto, @RequestHeader("maijiToken")String maijiToken);

    /**
     * 评论点赞
     * @param maijiToken
     * @return
     */
    public BaseOutPutDto<String> commentPraise(BaseInputDto<IdInputDto> inputDto, @RequestHeader("maijiToken")String maijiToken);

    /**
     * 取消评论点赞
     * @param inputDto
     * @param maijiToken
     * @return
     */
    public BaseOutPutDto<String> cancelCommentPraise(BaseInputDto<IdInputDto>inputDto,@RequestHeader("maijiToken")String maijiToken);


    /**
     * 评论删除 用于前端
     * @param inputDto
     * @param maijiToken
     * @return
     */
    public BaseOutPutDto<String> commentdelete(BaseInputDto<IdInputDto>inputDto,String maijiToken);

    /**
     * 评论删除 用于管理平台
     * @param inputDto
     *
     * @return
     */
    public BaseOutPutDto<String> commentManageDelete(BaseInputDto<IdInputDto>inputDto);

    BaseMetaResDto<List<ComMsgInfo>> findAllMsgs(String nickName, String title, String content, ReqMetaData metaData);

    BaseMetaResDto<List<ComComment>> findAllComments(String msgId, Integer read_already, Integer delete, String nickName, String content, ReqMetaData metaData);

    BaseResDto readComment(List<ComComment> comComments);
}
